export default (url, method, params) => {
	// const userId = uni.getStorageSync('userId');
	const userId = '202108764427'
	uni.showLoading({
		title: "加载中"
	});
	return new Promise((resolve, reject) => {
		uni.request({
			url: "http://43.138.211.141:9052/" + url,
			method: method,
			header: {
				userId: userId
			},
			params: {
				...params
			},
			success(res) {
				resolve(res.data);
			},
			fail(err) {
				reject(err);
			},
			complete() {
				uni.hideLoading();
			}
		});
	});
};